enum FROM {
    CLOUD,
    LOCAL
}
const cloudPath = ''
const localPath = '/images/'
let From = FROM.LOCAL
export const IMAGES = {
    'empty': sameName('empty.png'),
    'logo': sameName('logo.jpg'),
    'led': sameName('led.png'),
    'shangdian': sameName('shangdian.png'),
    'wifi': sameName('wifi.png'),
    'connection': sameName('connection.png'),
    'loading': sameName('loading.png'),
    'gengxinbiangeng': sameName('gengxinbiangeng.png'),
    'jiagouliucheng': sameName('jiagouliucheng.png'),
    'rilirichengjihua': sameName('rilirichengjihua.png'),
    'tongzhigonggao': sameName('tongzhigonggao.png'),
}

export function R(cloud: string, local: string): string {
    if (From === FROM.CLOUD) return cloud
    else return local
}

export function RA(cloud: string[], local: string[]): string[] {
    if (From === FROM.CLOUD) return cloud
    else return local
}

export function sameName(name: string) {
    return R(cloudPath + name, localPath + name)
}

export function sameNameA(name: string[]) {
    return RA(name.map(x => cloudPath + x), name.map(x => localPath + x))
}